package com.mwh.yuantu.dao.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mwh.yuantu.entity.ReplyInfoEntity;
import org.apache.ibatis.annotations.Param;

/**
 * (ReplyInfo)表数据库访问层
 *
 * @author maweihong
 * @since 2023-11-01 09:47:31
 */
public interface ReplyInfoMapper extends BaseMapper<ReplyInfoEntity> {

    /**
     * 插入新的回复
     * @param replyInfo
     * @return
     */
    int insert(ReplyInfoEntity replyInfo);

    /**
     * 获取某个评论的回复列表
     * @param commentId 评论表主键
     * @return
     */
    List<ReplyInfoEntity> listByCommentId(String commentId);

    /**
     * 获取某个视频的回复条数
     * @param videoId 视频主键
     * @return
     */
    int countByVideoId(String videoId);

    /**
     * 删除回复表中的内容
     * @param userIdArr 用户id数组
     * @return
     */
    int deleteByUserIdArr(@Param("userIdArr") String[] userIdArr);
}
